#ifndef __PHAARFEATURESET_H
#define __PHAARFEATURESET_H

#include "sdopencv/PHaarType.hpp"

namespace sdopencv
{

    typedef std::vector<PHaarFeature> PHaarFeatureSet;

    PHaarFeatureSet *generate_set_PHaar_all(int patch_len);

    std::istream& operator >>(std::istream &is, PHaarFeatureSet &obj);
    std::ostream& operator <<(std::ostream &os, const PHaarFeatureSet &obj);


    // project N square patches (uchar 1 channel) of length patch_len down to 1D using a subset of features
    // src is a continuous array of N*patch_len*patch_len bytes i.e. patch_len should be divisible by 4
    // dst is a continuous array of N doubles to store the projected values
    void project(unsigned char *src, double *dst, int N, int patch_len, PHaarFeatureSet *hfs, const std::vector<int> &indices);
}


#endif
